var team_power_info = {data : [[0, 9], [1, 8], [2, 9], [3, 8], [4, 7], [5, 9]]};

var Lloris_power_info = {data : [[0, 2], [1, 5], [2, 6], [3, 9], [4, 5], [5, 5]]};
var Dawson_power_info = {data : [[0, 3], [1, 4], [2, 9], [3, 9], [4, 8], [5, 6]]};
var Cahill_power_info = {data : [[0, 4], [1, 4], [2, 7], [3, 8], [4, 7], [5, 5]]};
var Vertonghen_power_info = {data : [[0, 6], [1, 6], [2, 7], [3, 7], [4, 8], [5, 5]]};
var Naughton_power_info = {data : [[0, 5], [1, 5], [2, 7], [3, 7], [4, 7], [5, 6]]};
var Parker_power_info = {data : [[0, 6], [1, 6], [2, 8], [3, 8], [4, 9], [5, 6]]};
var Jenas_power_info = {data : [[0, 7], [1, 9], [2, 9], [3, 4], [4, 7], [5, 7]]};
var Lennon_power_info = {data : [[0, 7], [1, 7], [2, 7], [3, 2], [4, 3], [5, 9]]};
var DiMaria_power_info = {data : [[0, 7], [1, 7], [2, 7], [3, 3], [4, 4], [5, 8]]};
var Bale_power_info = {data : [[0, 8], [1, 8], [2, 7], [3, 3], [4, 8], [5, 10]]};
var Defoe_power_info = {data : [[0, 9], [1, 7], [2, 8], [3, 4], [4, 8], [5, 8]]};

$(function(){
basic_radar(team_power_info);
$("#team_img").click(function(){
	basic_radar(team_power_info);
});
$(".Lloris").click(function(){
	basic_radar(Lloris_power_info);
});
$(".Dawson").click(function(){
	basic_radar(Dawson_power_info);
});
$(".Cahill").click(function(){
	basic_radar(Cahill_power_info);
});
$(".Vertonghen").click(function(){
	basic_radar(Vertonghen_power_info);
});
$(".Naughton").click(function(){
	basic_radar(Naughton_power_info);
});
$(".Parker").click(function(){
	basic_radar(Parker_power_info);
});
$(".Jenas").click(function(){
	basic_radar(Jenas_power_info);
});
$(".Lennon").click(function(){
	basic_radar(Lennon_power_info);
});
$(".DiMaria").click(function(){
	basic_radar(DiMaria_power_info);
});
$(".Bale").click(function(){
	basic_radar(Bale_power_info);
});
$(".Defoe").click(function(){
	basic_radar(Defoe_power_info);
});
});



function basic_radar(power_data) {
  // Radar Labels
  var ticks = [
	[0, "进攻"],
	[1, "技术"],
	[2, "团体"],
	[3, "防守"],
	[4, "力量"],
	[5, "速度"]
  ];

  // Draw the graph.
  var graph = Flotr.draw(document.getElementById("power_info"), power_data, {
	radar : { show : true},
	grid  : { circular : true, minorHorizontalLines : true},
	yaxis : { min : 0, max : 10, minorTickFreq : 2 ,showLabels:false},
	xaxis : { ticks : ticks}
  });
}